From 823ad35b29fa3a4482d4d2e893228ae41b19ce4f Mon Sep 17 00:00:00 2001 From: "sos22@labyrinth.cl.cam.ac.uk" Date: Fri, 4 Jul 2003 10:43:09 +0000 Subject: [PATCH] bitkeeper revision 1.267.1.1 (3f055a3dM7rMyFG8Br1OZcHwx7-wsA) Misc. bug fixes. --- .rootkeys | 1 + BitKeeper/etc/ignore | 1 + xen/common/domain.c | 2 ++ xen/drivers/block/xen_block.c | 3 ++- xen/drivers/block/xen_physdisk.c | 5 +++-- xen/include/xeno/physdisk.h | 13 +++++++++++++ 6 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 xen/include/xeno/physdisk.h diff --git a/.rootkeys b/.rootkeys index f88f1482ca..2c7e58bb55 100644 --- a/.rootkeys +++ b/.rootkeys @@ -454,6 +454,7 @@ 3ddb79c0MOVXq8qZDQRGb6z64_xAwg xen/include/xeno/pci_ids.h 3e54c38dlSCVdyVM4PKcrSfzLLxWUQ xen/include/xeno/perfc.h 3e54c38de9SUSYSAwxDf_DwkpAnQFA xen/include/xeno/perfc_defn.h +3f055a3dwldYR102YcSuBaxIf9t3Jw xen/include/xeno/physdisk.h 3ddb79c04nQVR3EYM5L4zxDV_MCo1g xen/include/xeno/prefetch.h 3e4540ccU1sgCx8seIMGlahmMfv7yQ xen/include/xeno/reboot.h 3ddb79c0LzqqS0LhAQ50ekgj4oGl7Q xen/include/xeno/sched.h diff --git a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore index 96401405cf..119cbbb8b4 100644 --- a/BitKeeper/etc/ignore +++ b/BitKeeper/etc/ignore @@ -419,3 +419,4 @@ xen/tools/figlet/figlet xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile.orig xenolinux-2.4.16-sparse/arch/xeno/drivers/block/block.c.orig xenolinux-2.4.16-sparse/scripts/kconfig.tk +xen/include/xeno/physdisk.h~ diff --git a/xen/common/domain.c b/xen/common/domain.c index 00edab32fe..d52835017e 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -16,6 +16,8 @@ #include #include #include +#include +#include /* * NB. No ring-3 access in initial guestOS pagetables. Note that we allow diff --git a/xen/drivers/block/xen_block.c b/xen/drivers/block/xen_block.c index 91fa180e7d..ff7fd7b36c 100644 --- a/xen/drivers/block/xen_block.c +++ b/xen/drivers/block/xen_block.c @@ -18,6 +18,7 @@ #include #include #include +#include #if 0 #define DPRINTK(_f, _a...) printk( _f , ## _a ) @@ -676,7 +677,7 @@ static void dispatch_rw_block_io(struct task_struct *p, int index) goto bad_descriptor; } if (p->domain != 0 && - !xen_physdisk_access_okay(&phys_seg, p, operation)) { + !xen_physdisk_access_okay(&phys_seg[nr_psegs], p, operation)) { DPRINTK("access denied\n"); /* XXX not quite right, but close enough. */ goto bad_descriptor; diff --git a/xen/drivers/block/xen_physdisk.c b/xen/drivers/block/xen_physdisk.c index 9061aef746..8f81c4084b 100644 --- a/xen/drivers/block/xen_physdisk.c +++ b/xen/drivers/block/xen_physdisk.c @@ -6,6 +6,7 @@ #include #include #include +#include #define MAX(a,b) ((a) > (b) ? (a) : (b)) @@ -84,7 +85,7 @@ static void xen_physdisk_revoke_access(unsigned short dev, ace_end <= start_sect) continue; - DPRINTK("Killing ace [%x, %x) against kill zone [%x, %x)\n", + DPRINTK("Killing ace [%lx, %lx) against kill zone [%lx, %lx)\n", cur_ace->start_sect, ace_end, start_sect, kill_zone_end); if (cur_ace->start_sect >= start_sect && @@ -234,7 +235,7 @@ int xen_physdisk_access_okay(phys_seg_t *pseg, struct task_struct *p, struct physdisk_ace *cur_ace; unsigned long sect; - DPRINTK("Checking access for domain %d, start sect %d, length %d.\n", + DPRINTK("Checking access for domain %d, start sect 0x%lx, length 0x%x.\n", p->domain, pseg->sector_number, pseg->nr_sects); for (sect = pseg->sector_number; diff --git a/xen/include/xeno/physdisk.h b/xen/include/xeno/physdisk.h new file mode 100644 index 0000000000..fd234cf9a5 --- /dev/null +++ b/xen/include/xeno/physdisk.h @@ -0,0 +1,13 @@ +#ifndef PHYSDISK_ACES__ +#define PHYSDISK_ACES__ + +struct task_struct; + +void destroy_physdisk_aces(struct task_struct *p); + +int xen_physdisk_grant(xp_disk_t *); +int xen_physdisk_probe(physdisk_probebuf_t *); +int xen_physdisk_access_okay(phys_seg_t *pseg, struct task_struct *p, + int operation); + +#endif /* PHYSDISK_ACES__ */ -- 2.30.2